<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/2/1 0001
 * Time: 上午 10:28
 */

namespace app\admin\controller;

use app\admin\model\Evaluate as A;

class Evaluate extends Common
{
    private $PageTitle ;
    //实例化model
    protected $db;
    protected function _initialize()
    {
        parent::_initialize();
        $this->db= new A();
    }
    public function index()
    {
        $allData=$this->db->getAllEvaluate();
        //halt($allData);
        $this->assign('allData',$allData);
        $this->PageTitle='评价管理';
        $this->generalInfor($this->PageTitle);
        return $this->fetch();
    }
    public function shelf()
    {
        $res=(new A())->shelf(input('param.'));
        $mess = array(
            'status' => $res['valid'],
            'message' => $res['msg']
        );
        return $mess;
    }
}